package com.yh.supergo.manager.feign;

import com.yh.supergo.http.HttpResult;
import com.yh.supergo.pojo.Brand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @InterfaceName BrandFeignClient
 * @Description FeignClient
 * @Author 0715-YuHao
 * @Date 2020/11/16 17:36
 * @Version 1.0
 */
@FeignClient("supergo-manager")
public interface BrandFeignClient {

    @GetMapping(value = "/brand/{id}")
    Brand findOne(@PathVariable Long id);

    @PostMapping(value = "/brand/query/{page}/{rows}")
    HttpResult findPage(@RequestBody(required = false) Brand brand,
                               @PathVariable Integer page,
                               @PathVariable Integer rows);
}
